from pathlib import Path
import fire
from .sim_create_gt_database import create_groundtruth_database


def nuscenes_data_prep(root_path, createdata_root, version, nsweeps=10):
    import sim_nuscenes_tracking as nu_ds
    nu_ds.create_nuscenes_tracking_infos(root_path, createdata_root, version=version, nsweeps=nsweeps)

    create_groundtruth_database(
        "NUSC",
        createdata_root,
        Path(createdata_root) / "infos_train_{:02d}sweeps_tracking.pkl".format(nsweeps),
        nsweeps=1,
    )


if __name__ == "__main__":
    data_root = '/data0/HR_dataset/nuscenes/data/nuscenes'
    createdata_root = '/home/zhangcan/zad/simtrack1/v1.0_trainval/'
    version = "v1.0-trainval"
    nuscenes_data_prep(data_root, createdata_root, version)